<?xml version="1.0" encoding="utf-8" ?> 

<ReportConfig> 
  
  
  
  <REnter> 
      <ReportData SqlParas="TABLEID">
		<![CDATA[
		Select * From viewbuffetorder where statusid =2 and tableid=((0)) and createddate between adddate(CURdate(),interval 6 hour) and adddate(CURdate(),interval 30 hour);
		]]>
		</ReportData>
		
    <ReportTemplate PrinterType="FILE" PrinterName="\\.\COM3" PrintCopy="1"> 
        enterxml.vm 
    </ReportTemplate>


	</REnter>
	
	
	
  <RCheck> 
  		<ReportData SqlParas="ORDERID">
		<![CDATA[
		SELECT (o.subtotal+o.tax - o.discount + o.gratuity) as ordertotalamount,(o.subtotal+o.tax - o.discount ) as orderamountdue, o.*, od.*, sm.*,substring_index(sm.endishname,"_",-1) as myendishname,substring_index(sm.cndishname,"_",-1) as mycndishname,  vbo.customer, vbo.customertype , vbo.tableid, vbo.dishgroupid, emp.Fname,emp.Lname , o.gratuity as paymenttips
             FROM orders o, orderdetails od ,submenu sm, viewbuffetorder vbo , employee emp
             where o.orderid = od.orderid and sm.submenuid = od.dishid and ( vbo.orderid=o.orderid or vbo.sycorderid = o.orderid)
             and vbo.id =od.viewbuffetorderid
             and o.orderid =((0))
             and emp.staffid = o.waiterid
             order by vbo.id;
		]]>
		</ReportData>
		
		<ReportTemplate PrinterType="FILE"  PrinterName="\\.\COM3" PrintCopy="1">
			checkxml.vm
		</ReportTemplate>
		

	</RCheck>
	
	
	  <RReceipt> 
	  		<ReportData SqlParas="ORDERID">
		<![CDATA[
SELECT (o.subtotal+o.tax - o.discount + inv.tip) as ordertotalamount,(o.subtotal+o.tax - o.discount ) as orderamountdue, o.*, od.*, sm.*,substring_index(sm.endishname,"_",-1) as myendishname,substring_index(sm.cndishname,"_",-1) as mycndishname,vbo.customer, vbo.customertype , vbo.tableid, vbo.dishgroupid, emp.Fname,emp.Lname, bc1.configkey as paymenttype, inv.amount+inv.tip as paymentamount, inv.tip as paymenttips
             FROM orders o, orderdetails od ,submenu sm, viewbuffetorder vbo , employee emp, invoice inv, buffetconfig bc1
             where o.orderid = od.orderid and sm.submenuid = od.dishid and ( vbo.orderid=o.orderid or vbo.sycorderid = o.orderid)
             and vbo.id =od.viewbuffetorderid
             and o.orderid =((0))
             and emp.staffid = o.waiterid
             and bc1.name='PAYMENT_TYPE'
             and bc1.configvalue = inv.paymenttype
              and inv.orderid = o.orderid
             order by vbo.id;]]>
		</ReportData>
		<ReportTemplate PrinterType="FILE"  PrinterName="\\.\COM3" PrintCopy="1">
			receiptxml.vm
		</ReportTemplate>
		

	</RReceipt>

<RCheckLabel> 
		<ReportData SqlParas="ORDERID">
		<![CDATA[
		SELECT  o.*, od.*, sm.*
             FROM orders o, orderdetails od ,submenu sm
             where o.orderid = od.orderid and sm.submenuid = od.dishid
             and o.orderid =((0))
             order by od.indexs;
		]]>
		</ReportData>
		<ReportTemplate PrinterType="TEXT"  PrinterName="\\.\COM2" PrintCopy="1">
			checklabelxml.vm
		</ReportTemplate>
		

	</RCheckLabel>


</ReportConfig>